﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UIPanel_Help : UIPanelBase {
    Transform panelRoot;
    Transform btnBack;

    public override void OnInit(Transform root)
    {
        base.OnInit(root);
        panelRoot = root;
        InitGameObj();
        InitEvent();
    }

    void InitGameObj()
    {
        btnBack = panelRoot.Find("btn_back");
    }
    void InitEvent()
    {
        Button btn_back = btnBack.GetComponent<Button>();
        btn_back.onClick.RemoveAllListeners();
        btn_back.onClick.AddListener(Back);
    }

    void Back()
    {
        UIManager.CloseUI<UIPanel_Help>();
    }

    public override void Update()
    {
        base.Update();
    }
    public override void OnClose()
    {
        base.OnClose();
    }
}
